﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LINQPad.OpenAccess.Settings;
using Telerik.OpenAccess.Metadata;

namespace LINQPad.OpenAccess.Services
{
    /// <summary>
    /// Used to create the corresponding <see cref="IConnectionStringBuilder" /> for a backend, provider and connection settings.
    /// </summary>
    public interface IConnectionStringBuilderFactory
    {
        /// <summary>
        /// Creates the connection string builder for the specified parameters.
        /// </summary>
        /// <param name="providerName">Name of the provider.</param>
        /// <param name="connectionSettings">The connection settings.</param>
        /// <returns>
        /// The connection string builder or <c>null</c>.
        /// </returns>
        IConnectionStringBuilder CreateConnectionStringBuilder( string providerName, ConnectionSettings connectionSettings = null );
    }
}
